﻿using ProTrack.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace ProTrack.IServices.OA
{
    public interface ISystemPostServices
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model">数据模型</param>
        /// <returns></returns>
        public Task<bool> AddAsync(SystemPost model);
        /// <summary>
        /// 查询所有
        /// </summary>
        /// <returns></returns>
        public Task<IEnumerable<SystemPost>> GetAllAsync();
        /// <summary>
        /// 分页获取
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <param name="Code">岗位编码</param>
        /// <param name="Name">岗位名称</param>
        /// <returns></returns>
        public Task<IEnumerable<SystemPost>> GetAsync(int PageIndex, int PageSize, string Code, string Name);
        /// <summary>
        /// 获取总条数
        /// </summary>
        /// <param name="Code">岗位编码</param>
        /// <param name="Name">岗位名称</param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string Code, string Name);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model">数据模型</param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(SystemPost model);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="Ids"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int[] Ids);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int Id);
    }
}
